<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>IDA SDK: Debugger functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">IDA SDK
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="files.html"><span>Header&#160;Files</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">Modules</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Debugger functions</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Control the debugging of a process. </p>
<p>Debugger functions complete either SYNCHRONOUSLY or ASYNCHRONOUSLY:</p>
<ul>
<li>SYNCHRONOUS FUNCTIONS execute the entire action before the function returns.</li>
<li>ASYNCHRONOUS FUNCTIONS return before the action has executed in its entirety. They simply start the action, but the result of the action will only be available later. For example, <a class="el" href="group__dbg__funcs__flow.html#gaf688dcf810c358c63cec805328022113" title="Execute the process until the given address is reached. ">run_to()</a> can execute a lot of instructions before terminating. Such functions provide a notification code to indicate the end of their execution (see the 'Notification' keyword in the function documentation). Install a callback using <a class="el" href="idp_8hpp.html#a9ff01a67acece6c7a82871ce43892508" title="Register a callback for a class of events in IDA. ">hook_to_notification_point()</a> to be notified when the action is terminated.</li>
</ul>
<p>DEBUGGER COMMANDS are functions who influence the execution of the debugged process. They are available in 2 forms:</p>
<ul>
<li>COMMAND(): (e.g. <a class="el" href="group__dbg__funcs__cmds.html#gafde4e91a01fb308d4418512ccb369637" title="Suspend the process in the debugger. ">suspend_process()</a>) In this mode, the command will be directly executed. However, it is forbidden to use asynchronous commands in this mode from a debugger notification handler (see <a class="el" href="dbg_8hpp.html#ac67a564945a2c1721691aa2f657a908c" title="Debugger notification codes. ">dbg_notification_t</a>).</li>
<li>request_COMMAND(): (e.g. <a class="el" href="group__dbg__funcs__cmds.html#ga17e3941d0bb55d22c230d16a9ff155de" title="Post a suspend_process() request. ">request_suspend_process()</a>) In this mode, a REQUEST to run the command will be memorized at the end of the REQUEST QUEUE (see below). This is mandatory to use this mode for asynchronous commands from a debugger notification handler (see <a class="el" href="dbg_8hpp.html#ac67a564945a2c1721691aa2f657a908c" title="Debugger notification codes. ">dbg_notification_t</a>).</li>
</ul>
<p>The REQUEST QUEUE contains a list of planned debugger commands. These commands will be started only in the following cases:</p>
<ul>
<li>the previous command terminated, and no call to <a class="el" href="group__dbg__funcs__cmds.html#gafde4e91a01fb308d4418512ccb369637" title="Suspend the process in the debugger. ">suspend_process()</a> or <a class="el" href="group__dbg__funcs__cmds.html#ga8833a43919fac27965ef862bbc2b5073" title="Continue the execution of the process in the debugger. ">continue_process()</a> occurred in the asynchronous function result notification handler (if any).</li>
<li><a class="el" href="group__dbg__funcs.html#ga7a7be026d9efa51e8a10936c38a1f50f" title="Execute requests until all requests are processed or an asynchronous function is called. ">run_requests()</a> was called. Please note that when called from a debugger notification handler the queued requests will only be started after the execution of all notification handlers.</li>
</ul>
<p>A request which fails to start (by returning 0) will generate a <a class="el" href="dbg_8hpp.html#ac67a564945a2c1721691aa2f657a908caee37fa6ba6030fdaf7494d95d0ec017d" title="An error occurred during the processing of a request. ">dbg_request_error</a> notification. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:group__dbg__funcs__cmds"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__cmds.html">Process commands</a></td></tr>
<tr class="memdesc:group__dbg__funcs__cmds"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use these functions to manipulate the debugged process. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__dbg__funcs__threads"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__threads.html">Threads</a></td></tr>
<tr class="memdesc:group__dbg__funcs__threads"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inspect/Manipulate threads of debugged process. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__dbg__funcs__modules"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__modules.html">Modules</a></td></tr>
<tr class="memdesc:group__dbg__funcs__modules"><td class="mdescLeft">&#160;</td><td class="mdescRight">Functions to enumerate modules loaded into the process. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__dbg__funcs__flow"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__flow.html">Execution flow control</a></td></tr>
<tr class="memdesc:group__dbg__funcs__flow"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use these functions to run instructions in the debugged process. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__dbg__funcs__regs"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__regs.html">Registers</a></td></tr>
<tr class="memdesc:group__dbg__funcs__regs"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inspect/Manipulate registers for debugged process. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__dbg__funcs__bpts"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__bpts.html">Breakpoints</a></td></tr>
<tr class="memdesc:group__dbg__funcs__bpts"><td class="mdescLeft">&#160;</td><td class="mdescRight">Work with debugger breakpoints. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__dbg__funcs__tracing"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__tracing.html">Tracing</a></td></tr>
<tr class="memdesc:group__dbg__funcs__tracing"><td class="mdescLeft">&#160;</td><td class="mdescRight">Trace instructions/functions/basic blocks. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__dbg__funcs__high"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__high.html">High level functions</a></td></tr>
<tr class="memdesc:group__dbg__funcs__high"><td class="mdescLeft">&#160;</td><td class="mdescRight">These functions can be used from scripts. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__dbg__funcs__srcinfo"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__srcinfo.html">Source information providers</a></td></tr>
<tr class="memdesc:group__dbg__funcs__srcinfo"><td class="mdescLeft">&#160;</td><td class="mdescRight">These providers supply information about the source files and lines to the source level debugger. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__dbg__funcs__mem"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__mem.html">Debugger memory functions for UI</a></td></tr>
<tr class="memdesc:group__dbg__funcs__mem"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inspect debugged process memory. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__dbg__funcs__conv"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs__conv.html">Misc</a></td></tr>
<tr class="memdesc:group__dbg__funcs__conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience functions offered by the user interface. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga7a7be026d9efa51e8a10936c38a1f50f"><td class="memItemLeft" align="right" valign="top">bool <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs.html#ga7a7be026d9efa51e8a10936c38a1f50f">run_requests</a> (void)</td></tr>
<tr class="memdesc:ga7a7be026d9efa51e8a10936c38a1f50f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Execute requests until all requests are processed or an asynchronous function is called.  <a href="#ga7a7be026d9efa51e8a10936c38a1f50f">More...</a><br /></td></tr>
<tr class="separator:ga7a7be026d9efa51e8a10936c38a1f50f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafa6475682b46eb93b8d15054cb5af0ac"><td class="memItemLeft" align="right" valign="top"><a class="el" href="kernwin_8hpp.html#a4a23e389ff9cbf1cd31179ca2f393334">ui_notification_t</a> <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs.html#gafa6475682b46eb93b8d15054cb5af0ac">get_running_request</a> (void)</td></tr>
<tr class="memdesc:gafa6475682b46eb93b8d15054cb5af0ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current running request.  <a href="#gafa6475682b46eb93b8d15054cb5af0ac">More...</a><br /></td></tr>
<tr class="separator:gafa6475682b46eb93b8d15054cb5af0ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0d250ba97c49af20ccf106dc9c60417d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga0d250ba97c49af20ccf106dc9c60417d"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs.html#ga0d250ba97c49af20ccf106dc9c60417d">is_request_running</a> (void)</td></tr>
<tr class="memdesc:ga0d250ba97c49af20ccf106dc9c60417d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is a request currently running? <br /></td></tr>
<tr class="separator:ga0d250ba97c49af20ccf106dc9c60417d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga19bdc7609576cd2618c9e43ac1def6ec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="dbg_8hpp.html#ac67a564945a2c1721691aa2f657a908c">dbg_notification_t</a> <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs.html#ga19bdc7609576cd2618c9e43ac1def6ec">get_running_notification</a> (void)</td></tr>
<tr class="memdesc:ga19bdc7609576cd2618c9e43ac1def6ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the notification associated (if any) with the current running request.  <a href="#ga19bdc7609576cd2618c9e43ac1def6ec">More...</a><br /></td></tr>
<tr class="separator:ga19bdc7609576cd2618c9e43ac1def6ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2e491f571ade52bfee75073d46b02bdc"><td class="memItemLeft" align="right" valign="top">void <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbg__funcs.html#ga2e491f571ade52bfee75073d46b02bdc">clear_requests_queue</a> (void)</td></tr>
<tr class="memdesc:ga2e491f571ade52bfee75073d46b02bdc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear the queue of waiting requests.  <a href="#ga2e491f571ade52bfee75073d46b02bdc">More...</a><br /></td></tr>
<tr class="separator:ga2e491f571ade52bfee75073d46b02bdc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga7a7be026d9efa51e8a10936c38a1f50f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> run_requests </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Execute requests until all requests are processed or an asynchronous function is called. </p>
<table class="doxtable">
<tr>
<td>Type</td><td>Synchronous function </td></tr>
<tr>
<td>Notification</td><td>none (synchronous function) </td></tr>
</table>
<dl class="section return"><dt>Returns</dt><dd>false if not all requests could be processed (indicates an asynchronous function was started) </dd></dl>
<dl class="section note"><dt>Note</dt><dd>If called from a notification handler, the execution of requests will be postponed to the end of the execution of all notification handlers. </dd></dl>

</div>
</div>
<a class="anchor" id="gafa6475682b46eb93b8d15054cb5af0ac"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="kernwin_8hpp.html#a4a23e389ff9cbf1cd31179ca2f393334">ui_notification_t</a> <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> get_running_request </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the current running request. </p>
<table class="doxtable">
<tr>
<td>Type</td><td>Synchronous function </td></tr>
<tr>
<td>Notification</td><td>none (synchronous function) </td></tr>
</table>
<dl class="section return"><dt>Returns</dt><dd>ui_null if no running request </dd></dl>

</div>
</div>
<a class="anchor" id="ga19bdc7609576cd2618c9e43ac1def6ec"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="dbg_8hpp.html#ac67a564945a2c1721691aa2f657a908c">dbg_notification_t</a> <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> get_running_notification </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the notification associated (if any) with the current running request. </p>
<table class="doxtable">
<tr>
<td>Type</td><td>Synchronous function </td></tr>
<tr>
<td>Notification</td><td>none (synchronous function) </td></tr>
</table>
<dl class="section return"><dt>Returns</dt><dd>dbg_null if no running request </dd></dl>

</div>
</div>
<a class="anchor" id="ga2e491f571ade52bfee75073d46b02bdc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> clear_requests_queue </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Clear the queue of waiting requests. </p>
<table class="doxtable">
<tr>
<td>Type</td><td>Synchronous function </td></tr>
<tr>
<td>Notification</td><td>none (synchronous function) </td></tr>
</table>
<dl class="section note"><dt>Note</dt><dd>If a request is currently running, this one isn't stopped. </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
